<form action="index.php" method="post" name="adminForm">
  <table class="adminlist">
    <thead>
      <tr>
        <th width="5%">
          <input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($this->byes); ?>);" />
        </th>
        <th width="15%"><?= JHTML::_( 'grid.sort', 'Start Date', 'start_date', $this->lists['order_Dir'], $this->lists['order']); ?></th>
        <th width="15%"><?= JHTML::_( 'grid.sort', 'End Date', 'end_date', $this->lists['order_Dir'], $this->lists['order']); ?></th>
        <th width="5%"><?= JHTML::_( 'grid.sort', 'Published', 'published', $this->lists['order_Dir'], $this->lists['order']); ?></th>
      </tr>
    </thead>  
    <?php
      jimport('joomla.filter.output');
      $k = 0;
      $n = count($this->byes);
      for ($i=0; $i < $n; $i++)
      {
        $bye = &$this->byes[$i];
        $checked = JHTML::_('grid.id', $i, $bye->id);
        $published = JHTML::_('grid.published', $bye, $i);
        $link = 'index.php?option=' . $option . '&task=edit&c=bye&cid[]='. $bye->id;
        $bye->start_date = date('M. j, Y', strtotime($bye->start_date));
        $bye->end_date = date('M. j, Y', strtotime($bye->end_date));
    ?>
      <tr>
        <td align="center">
          <?= $checked; ?>
        </td>
        <td align="center">
          <a href="<?= $link ?>"><?= $bye->start_date ?></a>
        </td>
        <td align="center">
          <a href="<?= $link ?>"><?= $bye->end_date ?></a>
        </td>        
        <td align="center">
          <?= $published ?>
        </td>
      </tr>
    <?php
        $k = 1 - $k;
      }
    ?>
    <tr>
      <td colspan="6"><?= $this->pagination->getListFooter(); ?></td>
    </tr>
  </table>
  <input type="hidden" name="option" value="<?php echo JRequest::getVar( 'option' );?>"/>
  <input type="hidden" name="c" value="<?php echo JRequest::getVar('c', 'bye'); ?>" />
    <input type="hidden" name="task" value=""/>
    <input type="hidden" name="boxchecked" value="0"/>      
  <input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
  <input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
</form>